﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></meta><style>/*<![CDATA[*/

table{border: 1px solid gray;}
td{border: 1px dotted gray;}
p{margin: 3px 0 3px 0; padding: 0;}
#ID_Footer{font-size: small; font-style: italic; text-align: right; margin-top: 4em; padding-top: 4px; border-top: 2px solid gray;}

/*]]>*/</style><title>第11章 颜色</title></head><body>
<div><br /></div>
<div style="text-align: center"><span style="font-family: 宋体; font-size: 30pt; padding-left: 77pt; line-height: 280%">第</span><span style="font-family: Calibri; font-size: 30pt; padding-left: 77pt; line-height: 280%">11</span><span style="font-family: 宋体; font-size: 30pt; padding-left: 77pt; line-height: 280%">章 &nbsp; &nbsp; &nbsp; &nbsp;颜色</span></div>
<div><span style="font-family: 微软雅黑; font-size: 16pt; padding-left: 18pt; line-height: 240%">1. &nbsp; &nbsp; &nbsp; &nbsp;概念</span></div>
<div><span style="font-family: 宋体; font-size: 12pt; color: #000000; line-height: 240%">注释，</span><span style="font-family: Times New Roman; font-size: 12pt; color: #000000; line-height: 240%">/* */ (p238)</span></div>
<div><span style="font-family: 宋体; font-size: 12pt; line-height: 240%">颜色解析</span><span style="font-family: Times New Roman; font-size: 12pt; line-height: 240%"> (p240-241)</span></div>
<div><span style="font-family: 宋体; font-size: 12pt; line-height: 240%">色调，饱和度，亮度</span><span style="font-family: Times New Roman; font-size: 12pt; line-height: 240%"> (p241)</span></div>
<div><span style="font-family: Times New Roman; font-size: 12pt; color: #ff0000; background-color: #ffff00; line-height: 240%">alpha</span><span style="font-family: 宋体; font-size: 12pt; color: #000000; line-height: 240%">值</span><span style="font-family: Times New Roman; font-size: 12pt; color: #000000; line-height: 240%"> (p243)</span></div>
<div><br /></div>
<div><span style="font-family: 微软雅黑; font-size: 16pt; font-weight: bold; padding-left: 18pt; line-height: 240%">2. &nbsp; &nbsp; &nbsp; &nbsp;属性</span></div>
<div><span style="font-family: Times New Roman; font-size: 12pt; color: #7030a0; line-height: 190%">color</span><span style="font-family: 宋体; font-size: 12pt; color: #000000; line-height: 190%">属性，前景色</span><span style="font-family: Times New Roman; font-size: 12pt; color: #000000; line-height: 190%"> (p238)</span></div>
<div><span style="font-family: Times New Roman; font-size: 12pt; line-height: 190%"> &nbsp; &nbsp; &nbsp; &nbsp;RGB</span><span style="font-family: 宋体; font-size: 12pt; line-height: 190%">值</span><span style="font-family: Times New Roman; font-size: 12pt; line-height: 190%">, </span><span style="font-family: Times New Roman; font-size: 12pt; color: #c00000; line-height: 190%">rgb(100, 100, 90)</span></div>
<div><span style="font-family: Times New Roman; font-size: 12pt; line-height: 190%"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="font-family: 宋体; font-size: 12pt; line-height: 190%">十六进制编码，</span><span style="font-family: Times New Roman; font-size: 12pt; color: #c00000; line-height: 190%">#ee3880</span></div>
<div><span style="font-family: Times New Roman; font-size: 12pt; line-height: 190%"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="font-family: 宋体; font-size: 12pt; line-height: 190%">颜色名称，浏览器可识别</span><span style="font-family: Times New Roman; font-size: 12pt; line-height: 190%">147</span><span style="font-family: 宋体; font-size: 12pt; line-height: 190%">种</span><span style="font-family: Times New Roman; font-size: 12pt; line-height: 190%">, e.g., </span><span style="font-family: Times New Roman; font-size: 12pt; color: #c00000; line-height: 190%">DarkCyan</span></div>
<div><span style="font-family: Times New Roman; font-size: 12pt; line-height: 190%"> &nbsp; &nbsp; &nbsp; &nbsp;HSLA</span><span style="font-family: 宋体; font-size: 12pt; line-height: 190%">方式</span><span style="font-family: Times New Roman; font-size: 12pt; line-height: 190%"> (p244-245)</span></div>
<div><span style="font-family: Times New Roman; font-size: 12pt; font-weight: bold; color: #7030a0; line-height: 240%">background-color</span><span style="font-family: 宋体; font-size: 12pt; color: #000000; line-height: 240%">属性，背景色</span><span style="font-family: Times New Roman; font-size: 12pt; color: #000000; line-height: 240%"> (p239)</span></div>
<div><span style="font-family: Times New Roman; font-size: 12pt; font-weight: bold; color: #7030a0; line-height: 240%">opacity</span><span style="font-family: 宋体; font-size: 12pt; color: #000000; line-height: 240%">属性，透明度，</span><span style="font-family: Times New Roman; font-size: 12pt; color: #000000; line-height: 240%">0.0~1.0</span><span style="font-family: 宋体; font-size: 12pt; color: #000000; line-height: 240%">之间</span><span style="font-family: Times New Roman; font-size: 12pt; color: #000000; line-height: 240%"> (CSS3, p243)</span></div>
<div><span style="font-family: Times New Roman; font-size: 12pt; color: #c00000; line-height: 240%">rgba</span><span style="font-family: 宋体; font-size: 12pt; color: #000000; line-height: 240%">值，</span><span style="font-family: Times New Roman; font-size: 12pt; color: #000000; line-height: 240%">a</span><span style="font-family: 宋体; font-size: 12pt; color: #000000; line-height: 240%">介于</span><span style="font-family: Times New Roman; font-size: 12pt; color: #000000; line-height: 240%">0.0~1.0(CSS3, </span><span style="font-family: 宋体; font-size: 12pt; color: #000000; line-height: 240%">不会作用于子元素，</span><span style="font-family: Times New Roman; font-size: 12pt; color: #000000; line-height: 240%">p243)</span></div>
<div><span style="font-family: Times New Roman; font-size: 12pt; color: #c00000; line-height: 240%">hsl</span><span style="font-family: 宋体; font-size: 12pt; color: #000000; line-height: 240%">值，</span><span style="font-family: Times New Roman; font-size: 12pt; color: #000000; line-height: 240%">h (0~360), s (0~100%), l (0~100%) (p245)</span></div>
<div><span style="font-family: Times New Roman; font-size: 12pt; color: #c00000; line-height: 240%">hsla</span><span style="font-family: 宋体; font-size: 12pt; color: #000000; line-height: 240%">值，</span><span style="font-family: Times New Roman; font-size: 12pt; color: #000000; line-height: 240%">a (0.0~1.0)</span></div>
<div><br /></div>
<div><br /></div>
<div><br /></div>
<div><br /></div>
<div><br /></div>
<div><br /></div>
<div><br /></div>
<div><br /></div>
<div><br /></div>
<div><br /></div>
<div><br /></div>
<div><br /></div>
<div><br /></div>
<div><br /></div>
<div><br /></div>
<div><br /></div>
<div><br /></div>
<div><br /></div>
<div><br /></div>
<div><br /></div>
<div><br /></div>
<div><br /></div><script type="text/javascript" language="javascript" src="jquery.js"></script><script type="text/javascript" language="javascript" src="itemlink.js"></script></body></html>